using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;

public class Test : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
		// Get all loaded assemblies in the current AppDomain
		var assemblies = AppDomain.CurrentDomain.GetAssemblies();

		// Get all unique namespaces from the loaded assemblies
		var namespaces = assemblies.SelectMany(a => a.GetTypes())
								   .Select(t => t.Namespace)
								   .Where(n => n != null)
								   .Distinct();

		// Write the namespaces to a text file
		using ( var writer = new StreamWriter("namespaces.txt") ) {
			foreach ( var ns in namespaces ) {
				writer.WriteLine(ns);
			}
		}

		Console.WriteLine("Done!");
	}

    // Update is called once per frame
    void Update()
    {
        
    }
}
